package nl.jworks.epuborganizer.server;

import nl.jworks.epuborganizer.client.GwtGreetingService;
import nl.jworks.epuborganizer.shared.FieldVerifier;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import nl.jworks.epuborganizer.spring.GreetingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;

/**
 * The server side implementation of the RPC service.
 */
@SuppressWarnings("serial")
public class GreetingServiceImpl extends AutoinjectingRemoteServiceServlet implements GwtGreetingService {

    private GreetingService greetingServiceSpring;

    public String greet(String name) {
        return greetingServiceSpring.greet(name);
    }

    @Autowired
    @Required
    public void setGreetingService(GreetingService greetingService) {
        this.greetingServiceSpring = greetingService;
    }
}
